package Day15;

import java.util.Scanner;

/**
 * Creat with IntelliJ IDEA
 * Description
 * User: mamba24
 * Date: 2022-09-28
 * Time: 18:25
 * To BE A Better Person-2020-3-2
 */
public class TestDemo1 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);

        while(sc.hasNextInt()){
            int num=sc.nextInt();
            int ret=0;
            while(num>0){
                if((num&1)==1){
                    ret++;
                }
                num>>>=1;
            }
            System.out.println(ret);

        }
    }
}
